package com.example.strategy.strategy.service;

import com.example.strategy.strategy.MyStrategy;
import com.example.strategy.strategy.MyStrategyReflexContent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Auther: chenxiuqi
 * @Date: 2020/4/27 20:38
 * @Description:
 */
@Service
public class StrategyReflexService {

    @Autowired
    private MyStrategyReflexContent reflexContent;


    public String play(String type){
        MyStrategy myStrategy = reflexContent.getMyStrategy(type);
        if (myStrategy !=null){
            return myStrategy.play("11111");
        }else {
            return "还没有这个宠物哟！~";
        }
    }

}
